package com.vv.tools.modules.sys.model;


import com.vv.tools.common.constant.sys.MenuTypeEnum;

import java.io.Serializable;
import java.util.List;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import io.swagger.v3.oas.annotations.media.Schema;

@Getter
@Setter
@ToString
@Schema(name = "Menu")
public class MenuDTO implements Serializable {

    /**
     * 主键ID
     */
    @Schema(title = "ID")
    private Long id;

    /**
     * PID
     */
    @Schema(title = "PID")
    private Long parentId;

    /**
     * 菜单名称
     */
    @Schema(title = "菜单名称")
    private String name;

    /**
     * 菜单地址
     */
    @Schema(title = "菜单地址")
    private String url;

    /**
     * 授权(多个用逗号分隔，如：user:list,user:create)
     */
    @Schema(title = "授权(多个用逗号分隔，如：user:list,user:create)")
    private String permission;

    /**
     * 类型(0：菜单, 1：按钮)
     */
    @Schema(title = "类型(0：菜单, 1：按钮)")
    private MenuTypeEnum type;

    /**
     * 菜单图标
     */
    @Schema(title = "菜单图标")
    private String icon;

    /**
     * 排序
     */
    @Schema(title = "排序")
    private Integer sort;

    @Schema(title = "子菜单")
    private List<MenuDTO> children;

}
